package com.pattern.design.visitor;

/**
 * @author LIN
 * @date 2021-06-07
 */
public class VisitorPatternDemo {
    public static void main(String[] args) {
        ComputerPart computer = new Computer();
        computer.accept(new ComputerPartVisitor() {

            @Override
            public void visit(Computer computer) {

            }

            @Override
            public void visit(Mouse mouse) {

            }

            @Override
            public void visit(Keyboard keyboard) {

            }

            @Override
            public void visit(Monitor monitor) {

            }
        });
    }
}
